#!/bin/bash
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

REPO_PATH="$(git rev-parse --show-toplevel)"

IFS=' ' read -ra artifacts <<<"$(make --no-print-directory -C "${REPO_PATH}" print-artifacts-SOURCE_BUILT_ARTIFACTS)"
for f in "${artifacts[@]}"; do
    mkdir -p "$(dirname "${f}")"
    touch "${f}"
done
